<?php
$this->beginBlock('toolbar');
$t = $this->toolbar();
echo $t->renderBegin();
echo $t->renderItem($this->link($this->__('system.button.back'), $this->historyUrl('*/*/*/index')));
echo $t->renderEnd();

$this->nextBlock('form');
$f = $this->modelForm;
$f->createField($this->__('cms.frontend_category_menu', TRUE))
  ->setInput($this->cmsCategorySelect('cms_category_id', 'model[argument][cms_category_id]'));
echo $f->renderBegin();
echo $f->renderChildren();
echo $this->hidden('url', 'model[url]')->setValue('/frontend/cms/category/index');
echo $f->renderEnd();

$t2 = $this->toolbar();
echo $t2->renderBegin();
echo $t2->renderItem($this->linkButton($this->__('system.button.save'), "submitForm('form')"));
echo $t2->renderEnd();
?>
<script language="javascript">
$('#cms_category_id').change(function(){
    $('#url').val('/frontend/cms/category/index/id/' + $(this).val());
});
</script>
<?php
$this->endBlock();
echo $this->extend('template'.DS.'form');